#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""

@author:
@contact:
@date: 2016-11-24 09:35
@version: 0.0.0
@license:
@copyright:

"""

import time

f=open("./log","r")#Opens file for reading

ipList={}
lines=f.readlines()
for line in lines:
    ip=line.split(" ")
    ip1=ip[0]
    time1=ip[3]
    time2=time1[1:21]
    timeArray=time.strptime(time2,"%d/%b/%Y:%H:%M:%S")
    timeStamp=time.mktime(timeArray)
#    print(ip)
#    print(timeStamp)
    if ip1 not in ipList.keys():
        ipList[ip1]=[1,timeStamp]
    else:
        ipList[ip1][0]+=1
        sum=timeStamp-ipList[ip1][1]
#         print int(sum)
        if((ipList[ip1][0])%2==0 and int(sum)<=60):
            print ip1+" ERROR"
        elif((ipList[ip1][0])%2==0):
            ipList[ip1][1]=timeStamp
#            print (timeStamp)
f.close()
for key in ipList:
    print key+"-->"+str(ipList[key][0])
